package com.qqt.csr.im.entity.msg;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.stream.StreamSupport;

/**
 * @Author: yang hao
 * @Date: 2024/10/14 10:43
 * @Description: 文本消息
 **/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
@Accessors(chain = true)
@Schema(description = "文本消息")
public class TextContent extends Content {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "文本内容")
    private String text;

    public static TextContent of(String text) {
        return new TextContent().setText(text);
    }

}
